﻿using System;
using System.Collections.Generic;

namespace AutoDb {
	/// <summary>
	/// 
	/// </summary>
	sealed class DbStatement : DbObject {
		/// <summary>
		/// 
		/// </summary>
		public string Name { get; set; }

		/// <summary>
		/// 
		/// </summary>
		public CommandType CommandType { get; set; }

		/// <summary>
		/// 
		/// </summary>
		public bool? AllowPaging { get; set; }

		/// <summary>
		/// 
		/// </summary>
		public bool? ReadOnly { get; set; }

		/// <summary>
		/// 
		/// </summary>
		public ResultType ResultType { get; set; }

		/// <summary>
		/// 
		/// </summary>
		public string ResultTable { get; set; }

		/// <summary>
		/// 
		/// </summary>
		public IList<DbParameter> Parameters { get; private set; }

		/// <summary>
		/// 
		/// </summary>
		public IList<DbText> Texts { get; private set; }

		/// <summary>
		/// 
		/// </summary>
		/// <param name="lineInfo"></param>
		public DbStatement(string lineInfo)
			: base(lineInfo) {
			Parameters = new List<DbParameter>();
			Texts = new List<DbText>();
		}
	} // end of DbStatement.
}
